/**
 * File Info：com.mys.springboot.service.user.UserService.java
 * Created Date：2017年5月15日 下午3:00:58
 * Created User: mys
 */
package com.mys.springboot.service.user;

import com.mys.springboot.repostory.IUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mys.springboot.config.base.BaseService;
import com.mys.springboot.model.User;

import java.util.List;

/**
 * @description
 * 
 * @author mys
 * @version 1.0
 *
 */
@Service
@Transactional
@javax.transaction.Transactional
public class UserService extends BaseService<User, Long> {
	@Autowired
	private IUserRepository userRepository;

	public void addUser(User user) throws Exception {
		this.save(user);
		throw new Exception();
	}

	public List<User> findByName(String name) {
		return userRepository.findByName(name);
	}
}
